package com.swt.gap.service;

import com.swt.gap.common.graph.GraphNeo4jVO;
import com.swt.gap.model.params.SearchNodeByProperty;
import com.swt.gap.model.vo.graph.ExpendMenuVO;
import com.swt.gap.model.vo.graph.NetworkAnalyseVO;
import com.swt.gap.model.vo.graph.PathAnalyzeVO;

import java.util.List;
import java.util.Set;

/**
 * 请填写说明
 *
 * @author sx
 * @date 2020/5/13 15:15
 */
public interface GraphService {

    List<GraphNeo4jVO.Node> listNodeByName(String keyword, Integer entityType);

    /**
     * 获取指定结点的路径
     * @author sx
     * @date 2019/12/8
     */
    GraphNeo4jVO getPath(PathAnalyzeVO pathAnalyzeVO);


    List<NetworkAnalyseVO> activityAnalyse(Integer taskId);

    List<NetworkAnalyseVO> importanceAnalyse(Integer taskId);

    List<NetworkAnalyseVO> betweennessAnalyse(Integer taskId);

    /**
     * 多结点扩展
     * @author sx
     * @date 2020/03/20
     */
    GraphNeo4jVO expendByNodes(String[] nodeIds, Integer taskId, Integer menuTypeCode, Integer pageNum, Integer pageSize);

    /**
     * 事件拆分
     */
    GraphNeo4jVO unmergeEvent(String startNodeId, String endNodeId, Integer taskId);

    List<NetworkAnalyseVO> indegreeCount(Integer taskId);

    List<NetworkAnalyseVO> outdegreeCount(Integer taskId);

    Set<String> listLabelsByTaskId(Integer taskId);

    Set<String> listKeysByLabel(Integer taskId, String label);


    /**
    *
    * @author sx
    * @date 2020/5/27 10:59
    */
    List<GraphNeo4jVO.Node> listNodeByProperty(SearchNodeByProperty property);

    List<ExpendMenuVO> listExpendMenu(String[] nodeIds, Integer taskId);

    List<GraphNeo4jVO.Link> listLinkByNodeId(String nodeId, Integer taskId);


}
